home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4749 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  745 b 

  1. Path: news.candu.aecl.ca!news
  2. From: Mark Kotyk <kotykm@sask.aecl.ca>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: How do you send ouput to the printer??
  5. Date: Wed, 31 Jan 1996 13:10:09 -0600
  6. Organization: AECL
  7. Message-ID: <310FBE91.65B0@sask.aecl.ca>
  8. References: <4en2f8$ds3@newsbf02.news.aol.com>
  9. NNTP-Posting-Host: speed.sask.aecl.ca
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b5 (WinNT; I)
  14.  
  15. Recursion wrote:
  16. > How do you send your cout statements to a printer.  Can anyone help
  17. > Please??
  18.  
  19. Don't you have to open a new stream.
  20.  
  21. ie: prn or lpt1 
  22.  
  23. in C this would be
  24.  
  25. FILE *printer;
  26. printer=fopen("LPT1","wt");
  27.  
  28. I haven't played with the C++ streams enough to know it in c++.
  29.